#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

. $CCI_SRC/container/defconfig.sh
. ./docker_run.sh
docker_rm srv-http-initrd

cmd=(
	docker run
	--restart=always
	--name srv-http-initrd
	-e LISTEN_PORT=20008
	-p 20008:20008
	-v /srv/initrd/qemu-image:/srv/initrd/qemu-image:ro
	-v /srv/initrd/dockerimage:/srv/initrd/dockerimage:ro
	-v /srv/initrd/rpmbuild-pkg:/srv/initrd/rpmbuild-pkg:ro
	-v /srv/initrd/osimage:/srv/initrd/osimage:ro
	-v /srv/initrd/deps:/srv/initrd/deps:ro
	-v /etc/localtime:/etc/localtime:ro
	$(mount_ssl)
	-d
	srv-http
)

"${cmd[@]}"
